package com.bdqn.zhang.service.impl;

import com.bdqn.zhang.mapper.UserMapper;
import com.bdqn.zhang.pojo.User;
import com.bdqn.zhang.service.UserService;
import com.bdqn.zhang.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

public class UserServiceImpl implements UserService {


    @Override
    public User login(User user) {

        SqlSession session = MyBatisUtil.getSession();
        User u = session.getMapper(UserMapper.class).login(user);
        MyBatisUtil.closeSession(session);
        return u;
    }
}
